Ensure all relevant SaveLockedStateStore functions are synchronized with SaveLockedStateStore::save_changes#6547
Open
mgoldenberg wants to merge 3 commits intomatrix-org:mainfrom
Conversation
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6547 +/- ##
==========================================
+ Coverage 89.92% 89.93% +0.01%
==========================================
Files 381 381
Lines 106860 106901 +41
Branches 106860 106901 +41
==========================================
+ Hits 96095 96145 +50
+ Misses 7108 7099 -9
Partials 3657 3657 ☔ View full report in Codecov by Sentry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since #6478, the
BaseStateStoreuses aSaveLockedStateStoreto ensure that calls to the underlyingStateStore::save_changesare synchronized. It likely makes sense, however, to synchronize calls to otherStateStorefunctions which may interfere withStateStore::save_changes.Changes
SaveLockedStateStore::remove_roomso that it acquires the lock before issuing a call to the underlying store.SaveLockedStateStore::remove_room_with_guardfor cases where the lock has already been acquired and the caller would like to remove a room from the underlying store.Considerations
Below is a list of other
StateStorefunctions which write to the database. It does not seem like any of these would interfere withStateStore::save_changes, but they are listed below for examination by the reviewer, in case I have overlooked something.set_kv_dataremove_kv_dataset_custom_valueremove_custom_valuesave_send_queue_requestupdate_send_queue_requestremove_send_queue_requestupdate_send_queue_request_statussave_dependent_queued_requestmark_dependent_queued_requests_as_readyupdate_dependent_queued_requestremove_dependent_queued_requestupsert_thread_subscriptionremove_thread_subscriptionset_custom_value_no_readCloses #6546.
CHANGELOG.mdfiles.Signed-off-by: Michael Goldenberg m@mgoldenberg.net